package com.cjj.proxy;

/**
 * @ClassName Proxy
 * @Date 2021/07/28 18:08:27
 * @Created by ccc-j
 * @email ccc-ju@outlook.com
 */
public class Proxy implements House {

    private Xiaoming xiaoming;

    public Proxy(Xiaoming xiaoming){
        this.xiaoming = xiaoming;
    }

    @Override
    public void mai() {
        System.out.println("我是中介，监听你的买房操作开始。。。");
        xiaoming.mai();
        System.out.println("我是中介，监听你的买房操作结束。。。");
    }

    public static void main(String[] args) {
        Proxy proxy = new Proxy(new Xiaoming());
        proxy.mai();
    }

}
